package com.haoze.nurse.dao;

import com.haoze.common.mapper.MyMapper;

import com.haoze.nurse.model.PatientInHospitalEntity;
import feign.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface PatientInHospitalMapper extends MyMapper<PatientInHospitalEntity> {
    @Select("select PERSON_CODE from SYSMN.SYS_USER a\n" +
            "        left join SYSMN.EHR_SERVICE_PERSONAL b\n" +
            "        on a.PERSON_ID = b.PERSON_ID\n" +
            "        where a.USER_ID=#{userId}\n" +
            "        and rownum=1")
    String queryPersonCodeByUserId(@Param("userId") String userId);

}
